package com.zj.ssm.service.impl;

import com.zj.ssm.mapper.NewsApprovalMapper;
import com.zj.ssm.pojo.domain.News;
import com.zj.ssm.pojo.domain.Status;
import com.zj.ssm.pojo.domain.vo.NewsVO;
import com.zj.ssm.result.AjaxResult;
import com.zj.ssm.service.NewsApprovalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author wxr
 * @version 1.0
 * @date 2022/2/17 16:08
 */
@Service
public class NewsApprovalServiceImpl implements NewsApprovalService {
    @Autowired
    private NewsApprovalMapper newsApprovalMapper;


    @Override
    public AjaxResult pass(Integer id) {
       int int1 = newsApprovalMapper.pass(id);

        return AjaxResult.success();
    }

    @Override
    public AjaxResult reason(NewsVO newsVO) {
        int i = newsApprovalMapper.reason(newsVO);
        if (i<0){
            return AjaxResult.fail();
        }
        return AjaxResult.success();
    }



//    @Override
//    public AjaxResult passUpdate(NewsVO news) {
//        int i = newsApprovalMapper.passUpdate(news);
//        if (i<0){
//            return AjaxResult.fail();
//        }
//        return AjaxResult.success();
//    }
}
